<%-- 
    Document   : v
    Created on : Oct 30, 2009, 4:37:46 PM
    Author     : Phong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="DAOClass.*,java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <jsp:useBean id="Bean_Vote" class="DAOClass.vote">
        </jsp:useBean>
        <%
            String vName = Bean_Vote.selectVote();
            int idSelect = 0;
            ResultSet re = Bean_Vote.voidSelect();
            String vSelect = "";
        %>
        <form name="vote" action="include/process_vote.jsp" method="post">

            <table border="0" width="240" align="center" >
                <!--DWLayoutTable-->
                <thead>
                    <tr>
                        <th height="20" colspan="2" valign="top" align="left"><%=vName%></th>
                    </tr>
                </thead>
                <tbody>
                    <%

                while (re.next()) {
                    vSelect = re.getString("VoteSelect");
                    idSelect = re.getInt("SelectID");
                    %>


                    <tr>
                        <td width="20" height="22" valign="top"><input checked="checked" type="radio" name="select" value="<%=idSelect%>" /></td>
                        <td width="210" valign="top"><%=vSelect%></td>
                    </tr>

                    <%
}
                    %>
                    <tr>
                        <td colspan="2" align="center">
                            <input type="submit" value="Submit" name="ok">
                        </td>
                    </tr>
                </tbody>
            </table>
            <form>
                </body>
                </html>
